package com.yami.shop.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yami.shop.bean.model.TopicParticipation;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 用于记录用户参与的话题及其相关的动态 Mapper 接口
 * </p>
 *
 * @author EXiaoKe
 * @since 2025-04-14
 */
public interface TopicParticipationMapper extends BaseMapper<TopicParticipation> {

    @Select("SELECT topic_id FROM tz_topic_participations WHERE post_id = #{postId}")
    List<Long> findTopicIdsByPostId(@Param("postId") Long postId);


}
